Micron Document
Manual: `F0af`_`[Resources ↗`a8d24177d946de4f1f0a0fe1af9a1338:/page/blob.mu`g=reticulum|r=reticulum|ref=HEAD|path=docs/markdown/understanding.md|anchor=resources]`_`f

A `!resource`! is `F0af`_`[Reticulum`:/page/wiki.mu`path=Reticulum_Protocol]`_`f's mechanism for reliably transferring an arbitrary amount of data over an established `F0af`_`[link`:/page/wiki.mu`path=Link]`_`f.

It breaks data into individual packets on the transmitting end and reassembles them in order on the receiving end, while performing integrity checks. It can also automatically compress data.

>>Contents

• `F0af`_`[Usage`#usage]`_`f
• `F0af`_`[See also`#see-also]`_`f

>>Usage

Resources are very simple to use. `F0af`_`[RNS`:/page/wiki.mu`path=RNS]`_`f only requires a few lines of code to transfer any amount of data:

`B100`F9d9# Sender`f`b
`B100`F9d9resource = RNS.Resource(data, link, callback=my_callback)`f`b
`B100`F9d9`f`b
`B100`F9d9# Receiver`f`b
`B100`F9d9def resource_concluded(resource):`f`b
`B100`F9d9 data = resource.data.read()`f`b

For a more comprehensive use case, see the Filetransfer example in the manual.

>>See also

• `F0af`_`[Packet`:/page/wiki.mu`path=Packet]`_`f
• `F0af`_`[Link`:/page/wiki.mu`path=Link]`_`f

>>Reticulum concepts

`F0af`_`[Announce`:/page/wiki.mu`path=Announce]`_`f • `F0af`_`[Blackhole`:/page/wiki.mu`path=Blackhole]`_`f • `F0af`_`[Buffer`:/page/wiki.mu`path=Buffer]`_`f • `F0af`_`[Channel`:/page/wiki.mu`path=Channel]`_`f • `F0af`_`[Destination`:/page/wiki.mu`path=Destination]`_`f • `F0af`_`[Discovery`:/page/wiki.mu`path=Discovery]`_`f • `F0af`_`[Identity`:/page/wiki.mu`path=Identity]`_`f • `F0af`_`[Instance`:/page/wiki.mu`path=Instance]`_`f • `F0af`_`[Interface`:/page/wiki.mu`path=Interface]`_`f • `F0af`_`[Interface Access Code`:/page/wiki.mu`path=Interface_Access_Code]`_`f (IFAC) • `F0af`_`[Link`:/page/wiki.mu`path=Link]`_`f • `F0af`_`[Network identity`:/page/wiki.mu`path=Network_identity]`_`f • `F0af`_`[Node`:/page/wiki.mu`path=Node]`_`f • `F0af`_`[Packet`:/page/wiki.mu`path=Packet]`_`f • `F0af`_`[Path`:/page/wiki.mu`path=Path]`_`f • `F0af`_`[Propagation node`:/page/wiki.mu`path=Propagation_node]`_`f • Resource • `F0af`_`[Stamp`:/page/wiki.mu`path=Stamp]`_`f • `F0af`_`[Transport node`:/page/wiki.mu`path=Transport_node]`_`f

>>Resource

`!Source:`! `F0af`_`[Resource.py ↗`a8d24177d946de4f1f0a0fe1af9a1338:/page/blob.mu`g=reticulum|r=reticulum|ref=HEAD|path=RNS/Resource.py]`_`f
`!API:`! `F0af`_`[RNS.Resource ↗`a8d24177d946de4f1f0a0fe1af9a1338:/page/blob.mu`g=reticulum|r=reticulum|ref=HEAD|path=docs/markdown/reference.md|anchor=RNS.Resource]`_`f